package com.yz.mcd.base.function;

import com.yz.mcd.bean.UserInfoBean;

import java.text.MessageFormat;

/**
 * Created by XYLi on 2017/4/21.
 */

public class HttpUrlProvider {
    private static String baseUrl="http://120.27.95.22/CloudHome/index.php/Home/",
            login="Login",index="Index",share="Share";

    public static String getRegister(UserInfoBean user){
        String tmp="user_reg?user_name={0}&user_pwd={1}&check_pwd={2}&phone={3}&phoneCode={4}";
        tmp=MessageFormat.format(tmp,user.getUser_name(),
                user.getUser_pwd(),user.getUser_pwd(),
                user.getPhone(),user.getPhoneCode());
        return baseUrl+login+"/"+tmp;
    }

    public static String getLogin(UserInfoBean user)
    {
        String tmp="user_login?phone={0}&user_pwd={1}";
        tmp=MessageFormat.format(tmp,user.getPhone(),user.getUser_pwd());
        return baseUrl+login+"/"+tmp;
    }

}
